package com.xiaomaoguai.redis.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.KeySequence;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 接口调用日志
 * </p>
 *
 * @author WeiHui-Z
 * @since 2017-06-21
 */
@TableName("CRS_INTERFACE_CALL_LOG")
@KeySequence("CRS_INTERFACE_CALL_LOG_SEQ")//类注解
public class InterfaceCallLog extends Model<InterfaceCallLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    @TableField("HOST")
    private String host;

    /**
     * 接口名称
     */
    @TableField("INTERFACE_NAME")
    private String interfaceName;
    /**
     * 当前阶段
     */
    @TableField("STATUS")
    private String status;
    /**
     * 调用时间
     */
    @TableField("CALL_TIME")
    private Date callTime;
    /**
     * 调用成功1失败0
     */
    @TableField("SUCCESS")
    private boolean success;
    /**
     * 合同ID
     */
    @TableField("CONTRACT_ID")
    private String contractId;
    /**
     * 错误堆栈
     */
    @TableField("EXCEPTION_TRACE")
    private String exceptionTrace;
    /**
     * 调用结果
     */
    @TableField("RETURN_DATA")
    private String returnData;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getInterfaceName() {
        return interfaceName;
    }

    public void setInterfaceName(String interfaceName) {
        this.interfaceName = interfaceName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCallTime() {
        return callTime;
    }

    public void setCallTime(Date callTime) {
        this.callTime = callTime;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    public String getExceptionTrace() {
        return exceptionTrace;
    }

    public void setExceptionTrace(String exceptionTrace) {
        this.exceptionTrace = exceptionTrace;
    }

    public String getReturnData() {
        return returnData;
    }

    public void setReturnData(String returnData) {
        this.returnData = returnData;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "InterfaceCallLog{" +
                "host='" + host + '\'' +
                ", id=" + id +
                ", interfaceName='" + interfaceName + '\'' +
                ", status='" + status + '\'' +
                ", callTime=" + callTime +
                ", success='" + success + '\'' +
                ", contractId='" + contractId + '\'' +
                ", exceptionTrace='" + exceptionTrace + '\'' +
                ", returnData='" + returnData + '\'' +
                '}';
    }

}
